//add fcounty for South Carolina
// first associate each mcd with county. Then county to fips
// fips codes accessed here: https://www.nrcs.usda.gov/wps/portal/nrcs/detail/national/home/?cid=nrcs143_013697
// mcd to county accessed here: https://www.census.gov/geo/reference/codes/place.html


gen fcounty=.

replace fcounty=1 if county=="Abbeville" & state=="South Carolina"
replace fcounty=3 if county=="Aiken" & state=="South Carolina"
replace fcounty=5 if county=="Allendale" & state=="South Carolina"
replace fcounty=7 if county=="Anderson" & state=="South Carolina"
replace fcounty=9 if county=="Bamberg" & state=="South Carolina"
replace fcounty=11 if county=="Barnwell" & state=="South Carolina"
replace fcounty=13 if county=="Beaufort" & state=="South Carolina"
replace fcounty=15 if county=="Berkeley" & state=="South Carolina"
replace fcounty=17 if county=="Calhoun" & state=="South Carolina"
replace fcounty=19 if county=="Charleston" & state=="South Carolina"
replace fcounty=21 if county=="Cherokee" & state=="South Carolina"
replace fcounty=23 if county=="Chester" & state=="South Carolina"
replace fcounty=25 if county=="Chesterfield" & state=="South Carolina"
replace fcounty=27 if county=="Clarendon" & state=="South Carolina"
replace fcounty=29 if county=="Colleton" & state=="South Carolina"
replace fcounty=31 if county=="Darlington" & state=="South Carolina"
replace fcounty=33 if county=="Dillon" & state=="South Carolina"
replace fcounty=35 if county=="Dorchester" & state=="South Carolina"
replace fcounty=37 if county=="Edgefield" & state=="South Carolina"
replace fcounty=39 if county=="Fairfield" & state=="South Carolina"
replace fcounty=41 if county=="Florence" & state=="South Carolina"
replace fcounty=43 if county=="Georgetown" & state=="South Carolina"
replace fcounty=45 if county=="Greenville" & state=="South Carolina"
replace fcounty=47 if county=="Greenwood" & state=="South Carolina"
replace fcounty=49 if county=="Hampton" & state=="South Carolina"
replace fcounty=51 if county=="Horry" & state=="South Carolina"
replace fcounty=53 if county=="Jasper" & state=="South Carolina"
replace fcounty=55 if county=="Kershaw" & state=="South Carolina"
replace fcounty=57 if county=="Lancaster" & state=="South Carolina"
replace fcounty=59 if county=="Laurens" & state=="South Carolina"
replace fcounty=61 if county=="Lee" & state=="South Carolina"
replace fcounty=63 if county=="Lexington" & state=="South Carolina"
replace fcounty=65 if county=="McCormick" & state=="South Carolina"
replace fcounty=67 if county=="Marion" & state=="South Carolina"
replace fcounty=69 if county=="Marlboro" & state=="South Carolina"
replace fcounty=71 if county=="Newberry" & state=="South Carolina"
replace fcounty=73 if county=="Oconee" & state=="South Carolina"
replace fcounty=75 if county=="Orangeburg" & state=="South Carolina"
replace fcounty=77 if county=="Pickens" & state=="South Carolina"
replace fcounty=79 if county=="Richland" & state=="South Carolina"
replace fcounty=81 if county=="Saluda" & state=="South Carolina"
replace fcounty=83 if county=="Spartanburg" & state=="South Carolina"
replace fcounty=85 if county=="Sumter" & state=="South Carolina"
replace fcounty=87 if county=="Union" & state=="South Carolina"
replace fcounty=89 if county=="Williamsburg" & state=="South Carolina"
replace fcounty=91 if county=="York" & state=="South Carolina"
